/*
 * GameUtils.h
 *
 *  Created on: May 19, 2012
 *      Author: gonzalo
 */

#ifndef GAMEUTILS_H_
#define GAMEUTILS_H_

#include "Logger.h"
#include "SDL/SDL_image.h"
#include "../../SDLtoolkit/Parcel.h"
#include "../../common/DTOAsteroide.h"
#include "../../common/DTOShipStatus.h"
#include "list"
#include "../../SDLtoolkit/widgets/bonus/Bonus.h"
#include "../../SDLtoolkit/widgets/equipment/Equipment.h"


class GameUtils {
public:

	static bool overlaps(SDL_Rect rect1, SDL_Rect rect2);
	static void resolveOverlaping(const std::list<WidgetMovimiento*>& elementos,DTOShipStatus* dtoShipStatus,int widht,int height);
	static int getRandIntValueInRange(int dimension);
	static float getRandFloatValue();
	static bool isOverlapping(WidgetMovimiento* asteroide,DTOShipStatus* dtoShipStatus);
	static bool compareEquipment (std::pair<Equipment*,Bonus*>* first, std::pair<Equipment*,Bonus*>* second);

};

#endif /* GAMEUTILS_H_ */
